﻿@using CoiniumServ.Utils.Helpers
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<System.Collections.Generic.IEnumerable<CoiniumServ.Algorithms.IHashAlgorithmStatistics>>

<div class="row">
    <div class="col-md-12">
        <div class="box box-solid box-primary">
            <div class="box-header">
                <h3 class="box-title"><i class="fa fa-cog"></i> Algorithms</h3>
                <div class="box-tools pull-right">
                    <a href="/algorithms/" type="button" class="btn btn-primary"><i class="fa fa-angle-double-right"></i></a>
                </div>
            </div>
            <div class="box-body no-padding">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>Algorithm</th>
                            <th>Hashrate</th>
                            <th>Workers</th>
                            <th>Pools</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var algorithm in Model)
                        {
                            <tr>
                                <td><a href="/algorithm/@algorithm.Name">@algorithm.Name</a></td>
                                <td>@algorithm.Hashrate.GetReadableHashrate()</td>
                                <td>@algorithm.MinerCount</td>
                                <td>@algorithm.Count</td>
                            </tr>
                        }
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>